package com.service.impl;

import com.mapper.entity.StockCirculation;
import com.mapper.entity.StockCirculationDetail;
import com.mapper.entity.StockCirculationDetailOrg;
import com.service.AbstractHandleOrgToDbInstance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author: create by God of SJF
 * @version: v1.0
 * @description: com.service.impl
 * @date:2021/9/16
 */

@Component
public class HandleStockOrg extends AbstractHandleOrgToDbInstance {

    @Autowired
    StockOrgWrapper wrapper;

    @Autowired
    StockAdapter stockAdapter;

    public StockCirculationDetailOrg wrap(String line) {
        return wrapper.wrapper(line);
    }

    @Override
    public StockCirculation Instance(StockCirculationDetailOrg org) {
        return stockAdapter.stock(org);
    }

    @Override
    public StockCirculationDetail InstanceDetail(StockCirculationDetailOrg org) {
        return stockAdapter.detail(org);
    }
}
